#1
timetable = {}
while True:
    time = input("请输入星期几及时间段：例：星期一12:50-2:20")
    course = input("课程：")
    timetable[time] = course
    repeat = input("是否继续输入？(yes/no)")
    if repeat == "no":
        break

keyinput = input("请输入星期几及时间段：")
if keyinput in timetable:
    print("{key} 上 {value}".format(key=keyinput,value=timetable[keyinput]))
else:
    print("没课")

#2
a = [1,"下午","毛概实践","界面设计","晚上","毛概理论"]
b = [2,"早上","听说","下午","广告心理学"]
c = [3,"晚上","Python"]
e = [4,"早上","写作","阅读","下午","散打","晚上","API"]
f = [5,"","没课"]
riqi = int(input("请输入星期几的阿拉伯数字："))
shijian = input("请输入早、晚上或上、下午的字符串：")
if riqi == a[0]:
    if shijian == a[1]:
        print(a[2],a[3])
    elif shijian == a[4]:
        print(a[5])
    else:
        print("没课")
elif riqi == b[0]:
    if shijian == b[1]:
        print(b[2])
    elif shijian == b[3]:
        print(b[4])
    else:
        print("没课")
elif riqi == c[0]:
    if shijian == c[1]:
        print(c[2])
    else:
        print("没课")
elif riqi == e[0]:
    if shijian == e[1]:
        print(e[2],e[3])
    elif shijian == e[4]:
        print(e[5])
    elif shijian == e[6]:
        print(e[7])
    else:
        print("没课")
elif riqi == f[0]:
    print("没课")
else:
    print("没课")